import Cookies from 'js-cookie'
const TokenKey = 'sys_token'
const TokenWL  = 'token'
export function setToken(token){
  return Cookies.set(TokenKey, token)
}
export function get_Token(){
  return Cookies.get(TokenKey)
}
export function set_Userinfo(data){
  let userInfoString = JSON.stringify(data);
  localStorage.setItem("userInfo",userInfoString);
}
export function get_Userinfo(){
  let userInfo = JSON.parse(localStorage.getItem("userInfo"));
  return userInfo;
}
export function del_token(name){
  Cookies.remove(name);
}
export function setTokenWL(token){  // 设置另一个 token
  return Cookies.set(TokenWL, token)
}
export function get_TokenML(){
  return Cookies.get(TokenWL)
}